package com.breakfast.fun.data.entity.home;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/8/18.
 */
public class HomeData {

    private ActivityAd activityAd;
    /**
     * activityAd : {}
     * productClasses : []
     * moreProductsTipImage : http://static.52letsgo.cn/zz/moreProducts.jpg
     * centerAd : []
     * notice : []
     * products : []
     * fourAd : []
     */

    private String moreProductsTipImage;
    private List<ProductClasses> productClasses;
    private List<CenterAd> centerAd;
    private List<Notice> notice;
    private List<CenterAd> noticeTime;
    private List<Products> products;
    private List<FourAd> fourAd;
    //日常活动（签到，抽奖等）
    private List<FourAd> dailyActivity;
    //本周热卖、人气新品
    private List<Product> hotProduct;
    private List<Product> newProduct;


    public static HomeData objectFromData(String str) {

        return new Gson().fromJson(str, HomeData.class);
    }

    public static List<HomeData> arrayHomeDataFromData(String str) {

        Type listType = new TypeToken<ArrayList<HomeData>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public ActivityAd getActivityAd() {
        return activityAd;
    }

    public void setActivityAd(ActivityAd activityAd) {
        this.activityAd = activityAd;
    }

    public String getMoreProductsTipImage() {
        return moreProductsTipImage;
    }

    public void setMoreProductsTipImage(String moreProductsTipImage) {
        this.moreProductsTipImage = moreProductsTipImage;
    }

    public List<ProductClasses> getProductClasses() {
        return productClasses;
    }

    public void setProductClasses(List<ProductClasses> productClasses) {
        this.productClasses = productClasses;
    }

    public List<CenterAd> getCenterAd() {
        return centerAd;
    }

    public void setCenterAd(List<CenterAd> centerAd) {
        this.centerAd = centerAd;
    }

    public List<Notice> getNotice() {
        return notice;
    }

    public void setNotice(List<Notice> notice) {
        this.notice = notice;
    }

    public List<Products> getProducts() {
        return products;
    }

    public void setProducts(List<Products> products) {
        this.products = products;
    }

    public List<FourAd> getFourAd() {
        return fourAd;
    }

    public void setFourAd(List<FourAd> fourAd) {
        this.fourAd = fourAd;
    }

    public List<FourAd> getDailyActivity() {
        return dailyActivity;
    }

    public void setDailyActivity(List<FourAd> dailyActivity) {
        this.dailyActivity = dailyActivity;
    }

    public List<Product> getHotProduct() {
        return hotProduct;
    }

    public void setHotProduct(List<Product> hotProduct) {
        this.hotProduct = hotProduct;
    }

    public List<Product> getNewProduct() {
        return newProduct;
    }

    public void setNewProduct(List<Product> newProduct) {
        this.newProduct = newProduct;
    }

    public List<CenterAd> getNoticeTime() {
        return noticeTime;
    }

    public void setNoticeTime(List<CenterAd> noticeTime) {
        this.noticeTime = noticeTime;
    }
}
